home *** CD-ROM | disk | FTP | other *** search
/ The Fatted Calf / The Fatted Calf.iso / Applications / Graphics / Pyramid / Source / standard.h < prev    next >
C/C++ Source or Header  |  1993-07-07  |  1KB  |  77 lines

  1. /*    standard.h - Universal definitions
  2.  *    Copyright (C) 1993 Corona Design, Inc. All rights reserved.
  3.  *
  4.  *    Abstract
  5.  *        Common definitions shared by just about everything.
  6.  *
  7.  *    $LOG
  8.  */
  9.  
  10. #ifndef    _STANDARD_H
  11. #define    _STANDARD_H        1
  12.  
  13. /* Basic definitions and types.
  14.  */
  15.  
  16.                             // isolate C++ syntax
  17. #ifdef    __cplusplus
  18. #define    EXTERN_C        extern "C"
  19. #define    EXTERN_C_BEGIN    EXTERN_C {
  20. #define    EXTERN_C_END    }
  21. #else
  22. #define    EXTERN_C        
  23. #define    EXTERN_C_BEGIN    
  24. #define    EXTERN_C_END    
  25. #endif
  26.  
  27. EXTERN_C_BEGIN
  28. #include    <stdio.h>
  29. EXTERN_C_END
  30.             
  31. #ifdef    ASSERT
  32. #undef    ASSERT
  33. #endif
  34.  
  35. #if        defined(DEBUG)
  36. #define    ASSERT(p)     do {if (!(p)) { \
  37.                         printf ("assertion failed %s:%d\n", \
  38.                         __FILE__, __LINE__);}} while (FALSE)
  39. #else
  40. #define    ASSERT(p)
  41. #endif
  42.  
  43.  
  44. #if        !defined(BOOL) && !defined(_OBJC_OBJC_H_)
  45. typedef    char    BOOL;
  46. #endif
  47.  
  48. #ifndef    YES
  49. #define    YES    1
  50. #define    NO    0
  51. #endif
  52.  
  53. #ifndef    TRUE
  54. #define    TRUE    YES
  55. #define    FALSE    NO
  56. #endif
  57.  
  58.  
  59. //    Relational operators
  60.  
  61. #define    EQ    ==
  62. #define    GE    >=
  63. #define    GT    >
  64. #define    LE    <=
  65. #define    LT    <
  66. #define    NE    !=
  67.  
  68. //    Basic typedefs
  69.  
  70. typedef    unsigned char    BYTE;
  71. typedef    unsigned short    WORD;
  72. typedef    unsigned long    ULONG;
  73.  
  74. #define    NIL    nil
  75.  
  76.  
  77. #endif    _STANDARD_H